<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<form action="" method="post">
			用户名：<input type="text" src="" name="t_na"/><br>
			密码：<input type="password" name="t_pwd"/><br>
			性别：
			男<input type="radio" src="" name="sex" checked="checked"/>
				 女<input type="radio" src=""name="sex" /><br>
			
			学院:
			<select name="x_ot" >
				<option >软工学院</option>
				<option >信息学院</option>
				<option >医护学院</option>
			</select><br>
			爱好:羽毛球<input    type="checkbox" name="ah1" id="" value="羽毛球"/>
			  街舞<input    type="checkbox" name="ah2" id="" value="街舞"/>
			  计算机<input  type="checkbox" name="ah3" id="" value="计算机"/>
			  睡觉<input    type="checkbox" name="ah4" id="" value="睡觉"/><br>
			自我介绍：<textarea rows="" cols="" name="r_ea"  style="width: 100px;height: 60px;">
				
			</textarea><br>
			<button type="button">提交</button>
		</form>
	</body>
	<script type="text/javascript">
		// 3.4 按照name的方式查找各个元素
		var aa_1 =document.getElementsByName('t_na');
		console.log(aa_1);
		var aa_2 =document.getElementsByName('t_pwd');
		console.log(aa_2);
		var aa_3	=document.getElementsByName('sex');
		console.log(aa_3);
		var aa_4 =document.getElementsByName('x_ot');
		console.log(aa_4);
		var aa_5 =document.getElementsByName('ah1');
		console.log(aa_5);
		var aa_6	=document.getElementsByName('ah2');
		console.log(aa_6);
		var aa_7	=document.getElementsByName('ah3');
		console.log(aa_7);
		var aa_8	=document.getElementsByName('ah4');
		console.log(aa_8);
		var aa_9	=document.getElementsByName('r_ea');
		console.log(aa_9);
		// 3.5 按照标签的方式查找各个元素
		var bb1 =document.getElementsByTagName('input');
		console.log(bb1[0]);
		console.log(bb1[1]);
		console.log(bb1[2]);
		console.log(bb1[3]);
		console.log(bb1[4]);
		console.log(bb1[5]);
		console.log(bb1[6]);
		console.log(bb1[7]);
		console.log(bb1[8]);
		var bb2=document.getElementsByTagName('select');
		console.log(bb2[0]);
		var bb3=document.getElementsByTagName('textarea');
		console.log(bb3[0]);
	</script>
</html>
